import Guide from '@/components/Guide';
import { trim } from '@/utils/format';
import { PageContainer } from '@ant-design/pro-components';
import { useModel } from '@umijs/max';
import styles from './index.less';
import { Layout, Row, Typography, Descriptions } from 'antd';
import dayjs from 'dayjs';
const { Title } = Typography;
const HomePage = () => {
  const { initialState, setInitialState } = useModel('@@initialState');
  const { currentUser } = initialState;
  console.log(currentUser, 'initialState');
  return (
    <PageContainer ghost>
      <div className={styles.container}>
        <Descriptions>
          <Descriptions.Item label="用户名称" span={3}>
            {currentUser.username}
          </Descriptions.Item>
          <Descriptions.Item label="注册日期" span={3}>
            {dayjs(currentUser.createTime).format('YYYY-MM-DD HH:mm:ss')}
          </Descriptions.Item>
          <Descriptions.Item label="单价" span={3}>
            {currentUser.price}
          </Descriptions.Item>
          <Descriptions.Item label="条数" span={3}>
            {currentUser.num}
          </Descriptions.Item>
        </Descriptions>
        {/* <Typography.Title level={2} className={styles.title}>
         当前用户 <strong>{currentUser.username}</strong> ！
        </Typography.Title>
        <Title level={4}> 注册日期 {dayjs(currentUser.createTime).format('YYYY-MM-DD HH:mm:ss')}</Title>
        <Title level={4}> 当前单价 {currentUser.price}</Title>
        <Title level={4}> 当前条数 {currentUser.num}</Title> */}
      </div>
    </PageContainer>
  );
};

export default HomePage;
